/**
 * Created by gongxun on 17/4/3.
 */

var HallLogoutResponseHandler = function(){
    var that = new GameResponseBase();

    that.handle = function (binary, msgid) {
        that.loadMessage(binary, msgid);

        var code = that.msg.code;
        if (code == 4){
            //断开连接
            mo.gameWebsocket.setClose();

            //提示
            mo.sceneHelper.intoLoginLayer();

            //删除本地微信缓存
            mo.fileHelper.setAccessTokenAndLoginNameTimeOut();

            mo.showMsgDialogText("您的账号已离线，请重新登录");
        }else if (code == 3){
            //断开连接
            mo.gameWebsocket.setClose();

            //提示
            mo.sceneHelper.intoLoginLayer();

            //删除本地微信缓存
            mo.fileHelper.setAccessTokenAndLoginNameTimeOut();

            mo.showRoomMsgShow("您的账号已离线，请重新登录");
        }
    };

    return that;
};